# vim:ts=4:sw=4:noet:
""" UI element ids and shortcuts """

import wx

MenuInfo = {
		"FILE_NEW_PROJECT"       : "Ctrl+Alt+N",
		"FILE_OPEN"              : "Ctrl+O",
		"FILE_EXAMPLES"          : "",
		"FILE_SAVE"              : "Ctrl+S",
		"FILE_DELETE"            : "Ctrl+Alt+D",
		"FILE_SAVE_AS"           : "Ctrl+Shift+S",
		"FILE_PAGE_SETUP"        : "Ctrl+Shift+P",
		"FILE_PRINT"             : "Ctrl+P",
		"FILE_EXIT"              : "",

		"EDIT_UNDO"              : "Ctrl+Z",
		"EDIT_REDO"              : "Ctrl+Shift+Z",
		"EDIT_CUT"               : "Ctrl+X",
		"EDIT_COPY"              : "Ctrl+C",
		"EDIT_PASTE"             : "Ctrl+V",
		"EDIT_SELECT_ALL"        : "Ctrl+A",

		"VIEW_CONSOLE"           : "Ctrl+Shift+C",
		"VIEW_SIMULATOR"         : "Ctrl+Alt+S",
		"VIEW_BROWSER"           : "Ctrl+B",
		"VIEW_JUMPTO"            : "Ctrl+J",
		"VIEW_GET_INFO"          : "Ctrl+I",
		"VIEW_DOCUMENTATION"     : "Ctrl+D",

		"PROJECT_OPEN"           : "Ctrl+Shift+O",
		"PROJECT_NEW_METHOD"     : "Ctrl+N",
		"PROJECT_NEW_CLASS"      : "Ctrl+Shift+N",
		"PROJECT_COMPILE"        : "Ctrl+E",
		"PROJECT_ADD_EXISTING"   : "Ctrl+Shift+A",
		"PROJECT_RUN"            : "Ctrl+R",
		"PROJECT_STOP"           : "Ctrl+T",
		"PROJECT_PAUSERESUME"    : "Ctrl+Shift+R",
		"PROJECT_EDIT_LIBRARY"   : "",
		"PROJECT_AUTO_SWITCH"    : "",
		"PROJECT_EXPORT_ALL"     : "",
		"PROJECT_EXPORT_CLASS"   : "",
		"PROJECT_EXPORT_PACKAGE" : "",
		"PROJECT_IMPORT_CLASS"   : "",

		"DEV_CRASH"              : "",

		"EDIT_AUTOCOMPLETE"      : "Ctrl+Space",

		"HELP_ABOUT" : "",
		"HELP_REFERENCE" : "",
		"HELP_TUTORIAL" : "",
		}
class Ids:
	def __init__(self):
		self.shash ={}
		self.idhash = {}
		for m in MenuInfo:
			id = wx.NewId()
			setattr(self, m, id)
			self.idhash[id] = m
			if MenuInfo[m]=="":
				self.shash[id] = ""
			else:
				self.shash[id] = "\t"+MenuInfo[m]
		if wx.Platform == "__WXMAC__":
			setattr(self, "FILE_EXIT", wx.ID_EXIT)
			setattr(self, "HELP_ABOUT", wx.ID_ABOUT)
			self.shash[wx.ID_EXIT] = ""
			self.shash[wx.ID_ABOUT] = ""

class Shortcuts:
	def __init__(self):
		for m in MenuInfo:
			if MenuInfo[m]=="":
				setattr(self, m, "")
			else:
				setattr(self, m, "\t"+MenuInfo[m])

ids = Ids()
shortcuts = Shortcuts()
